<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<script src="../js/vue.js"></script>

<body>
    <div id="app">
        <h1>{{msg}}</h1>
    </div>
    <script>
        const vm = new Vue({
            // el: "#app",//没有写el配置选项，声明周期执行到created  ,beforeMount没有触发
            data: {
                msg: "走神的都回来了！"
            },
            created() {
                console.log('触发created');
            },
            beforeMount() {
                console.log('触发beforeMount')
            },
        })
        // 手动挂载一个未挂载的实例
        vm.$mount('#app');
    </script>
</body>

</html>